/* Person 板块下的 reducer */
import _ from "@/assets/utils"
import * as TYPES from "../action-types"

const initial = {
    num: 100,
    info: null
}

export const personalReducer = function (state = initial, action) {
    state = _.clone(true, state)
    let {type, payload} = action
    switch (type) {
        case TYPES.PERSONAL_INFO:
            state.info = payload
            break
        case TYPES.PERSONAL_SUP:
            state.oppNum++
            break
    }
    return state
}